﻿@model WebTest.Models.TestModel
@{
    ViewBag.Title = "Test";
}

<h2>Test</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>TestModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Liker)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Liker, ViewBag.Temp as List<SelectListItem>)
            @Html.ValidationMessageFor(model => model.Liker)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.RealName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RealName)
            @Html.ValidationMessageFor(model => model.RealName)
        </div>
     
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
@Html.CheckBoxFor(model => model.Liker, ViewBag.Temp as List<SelectListItem>)
@Html.RadioButtonFor(model => model.Liker, ViewBag.Temp as List<SelectListItem>)
@Html.RadioButton("Liker1", ViewBag.Temp as List<SelectListItem>, "1")
@Html.RadioButton("Liker2", ViewBag.Temp as List<SelectListItem>, "1")

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

